package com.atguigu.rabbit.producer.test;

import org.junit.jupiter.api.Test;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author Taeyang
 * @date 2025/4/7
 */
@SpringBootTest
public class Producer02Work {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @Test
    public void test01() {

        for (int i = 0; i < 10; i++) {
            rabbitTemplate.convertAndSend("work_queue", "Hello rabbit work queue..." + i);
        }
    }
}
